import ReactDOM from 'react-dom'
const list = [
  { id: 100, name: 'tom', age: 15 },
  { id: 101, name: 'jack', age: 18 },
  { id: 102, name: 'tony', age: 20 }
]
const element = (
  <ul>
    {list.map(item => {
      return (
        <li key='{item.id}'>
          <p>姓名:{item.name}</p>
          <p>年龄:{item.age}</p>
          <p>是否成年:{item.age > 18 ? '是' : '否'}</p>
        </li>
      )
    })}
  </ul>
)
ReactDOM.render(element, document.getElementById('root'))